/******************************************************************************
 * Copyright 2023 The Apollo Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *****************************************************************************/

#include "modules/canbus_vehicle/x3epro/x3epro_message_manager.h"

#include "modules/canbus_vehicle/x3epro/protocol/ads_brake_command_46.h"
#include "modules/canbus_vehicle/x3epro/protocol/ads_drive_command_50.h"
#include "modules/canbus_vehicle/x3epro/protocol/ads_eps_command_56.h"
#include "modules/canbus_vehicle/x3epro/protocol/ads_lampcommand_309.h"
#include "modules/canbus_vehicle/x3epro/protocol/security_brake_command_44.h"

#include "modules/canbus_vehicle/x3epro/protocol/aeb_systemstate_11.h"
#include "modules/canbus_vehicle/x3epro/protocol/light_horn_report_362.h"
#include "modules/canbus_vehicle/x3epro/protocol/scu_frontwheelspeed_301.h"
#include "modules/canbus_vehicle/x3epro/protocol/scu_rearwheelspeed_302.h"
#include "modules/canbus_vehicle/x3epro/protocol/vcu_brake_report_47.h"
#include "modules/canbus_vehicle/x3epro/protocol/vcu_drive_report_52.h"
#include "modules/canbus_vehicle/x3epro/protocol/vcu_eps_report_57.h"
#include "modules/canbus_vehicle/x3epro/protocol/vcu_powerstatus_214.h"
#include "modules/canbus_vehicle/x3epro/protocol/vcu_vehicle_fault_response_201.h"
#include "modules/canbus_vehicle/x3epro/protocol/vcu_vehicle_info_response_502.h"
#include "modules/canbus_vehicle/x3epro/protocol/vcu_vehicle_status_report_200.h"
#include "modules/canbus_vehicle/x3epro/protocol/vehicle_vin_501.h"

namespace apollo {
namespace canbus {
namespace x3epro {

X3eproMessageManager::X3eproMessageManager() {
  // Control Messages
  AddSendProtocolData<Adsbrakecommand46, true>();
  AddSendProtocolData<Adsdrivecommand50, true>();
  AddSendProtocolData<Adsepscommand56, true>();
  AddSendProtocolData<Adslampcommand309, true>();
  AddSendProtocolData<Securitybrakecommand44, true>();

  // Report Messages
  AddRecvProtocolData<Aebsystemstate11, true>();
  AddRecvProtocolData<Lighthornreport362, true>();
  AddRecvProtocolData<Scufrontwheelspeed301, true>();
  AddRecvProtocolData<Scurearwheelspeed302, true>();
  AddRecvProtocolData<Vcubrakereport47, true>();
  AddRecvProtocolData<Vcudrivereport52, true>();
  AddRecvProtocolData<Vcuepsreport57, true>();
  AddRecvProtocolData<Vcupowerstatus214, true>();
  AddRecvProtocolData<Vcuvehiclefaultresponse201, true>();
  AddRecvProtocolData<Vcuvehicleinforesponse502, true>();
  AddRecvProtocolData<Vcuvehiclestatusreport200, true>();
  AddRecvProtocolData<Vehiclevin501, true>();
}

X3eproMessageManager::~X3eproMessageManager() {}

}  // namespace x3epro
}  // namespace canbus
}  // namespace apollo
